home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
113
/
gfatip09
/
gfatip09.doc
next >
Wrap
Text File
|
1987-09-19
|
3KB
|
91 lines
September 19, 1987
GFATIP09.DOC
by John B. Holder
Senior Software Engineer
Marathon Computer Press
Asst. Sysop on GEnie's MichTron Roundtable
This is the 9th in a planned series of GFA Tip files. The
topic of this issue is creating a TTP file from GFA Basic. In
this archive you will find the following files:
MORE.TTP =>Compiled GFA Basic TTP File
MORE.BAS => GFA Basic Source Code for Program
GFATIP09.DOC => This file
Since the source code file is pretty self explanatory, I will
keep this Doc file pretty short. A bit of explanation comes
first. A TTP file must be:
Mandatory
1. Compiled
Optional
2. Clicked directly from the Desktop
3. Used with a CLI
4. Called from a Parent Program using EXEC
The only effective way to test a TTP program is to compile it
and test it directly. You will note that you can not run the
source for the More program from the interpreter without
modification. "So keep it in mind that you can not prepare TTP
programs without the GFA Basic Compiler."
Since there has been a lot of discussion in the MichTron
Bulletin Board about doing this sort of thing, I felt it was time
to demonstrate it. The little utility that I've cooked up for you
is nice to have around with a CLI that does not have the MORE
command. Use it with this .DOC file to see just what it will do.
Try this Command:
Double click on MORE.TTP
Enter this on the command line:
GFATIP09.DOC
What will happen is the file will be displayed to the screen
line for line until end of file. At the bottom of each page the
screen will pause until you press a key. At the end of the file
you see "EOF Please press a key to end". You will then be
returned to the desktop. You can try the same thing with a CLI
such as DOS Shell by Tim Purves like this:
From the prompt:
A>run more gfatip09.doc
-or-
A>more.ttp gfatip09.doc
(How your particular CLI functions may vary)
When you press return, the file will be displayed on the
screen for you in much the same manner except that you are
returned to the CLI instead of the desktop.
Word of Warning!!!!!!
By examining the source code you will find that I have NOT
included ANY error trapping. YOU MUST enter the correct file name
to be read by the More program along with it's extension. It will
ONLY work properly with ASCII files (ie...non ascii files can be
displayed, however the results are unpredictable and may hang up
the computer). So the bottom line is that you will have to do the
work to create a smooth running un-crashable program, this one is
just an example.
I hope this file and code helps to answer all of the
questions that you all have had concerning this subject. If you
happen to get stuck with something drop either myself or Rich Noe
(NOEGFA) a letter via GEnie Email and we'll try to help out.
John B. Holder